package dbops

import (
	_ "github.com/go-sql-driver/mysql"
	"log"
	"time"
)

func AddVideoDeletionRecord(videoName string) error {
	stmt, err := dbConn.Prepare("INSERT INTO video_del_rec (video_name,create_at) VALUES (?,?)")
	if err != nil {
		log.Println(err.Error())
		return err
	}
	_, err = stmt.Exec(videoName, time.Now().Format("2006-01-02 15:04:05"))
	if err != nil {
		log.Printf("AddVideoDeletionRecord error：%v", err)
		return err
	}
	defer stmt.Close()
	return nil
}
